﻿namespace ctolua.Models
{
    public class MRandomPool
    {
        /// <summary>
        /// 随机池
        /// </summary>
        public RandomPool randomPool { get; set; }
        /// <summary>
        /// 创建随机池
        /// </summary>
        public MRandomPool()
        {
            this.randomPool = game_api.create_random_pool();
        }
        /// <summary>
        /// 设置随机池指定整数权重
        /// </summary>
        /// <param name="value ">  整型   </param>
        /// <param name="weight ">  整型   </param>
        public void set(int? value, int? weight) => game_api.set_random_pool_value(this.randomPool, value, weight);
        /// <summary>
        /// 随机池增加指定整数权重
        /// </summary>
        /// <param name="value ">  整型   </param>
        /// <param name="increment ">  整型   </param>
        public void increase_random_pool_value(int? value, int? increment) => game_api.increase_random_pool_value(this.randomPool, value, increment);
        /// <summary>
        /// 随机池移除指定整数
        /// </summary>
        /// <param name="value ">  整型   </param>
        public void remove(int? value) => game_api.remove_random_pool_value(this.randomPool, value);
        /// <summary>
        /// 从随机池中获取一个随机整数
        /// </summary>
        /// <returns>整数</returns>
        public int? random(bool? remain) => game_api.get_bitrary_random_pool_value(this.randomPool, remain);
        /// <summary>
        /// 获取随机池中指定整数的权重概率
        /// </summary>
        /// <param name="value ">  整数   </param>
        /// <returns>权重概率</returns>
        public double? get_random_pool_probability(int? value) => game_api.get_random_pool_probability(this.randomPool, value);
        /// <summary>
        /// 获取随机池中指定整数的权重概率
        /// </summary>
        /// <returns>总权重</returns>
        public int? get_random_pool_all_weight => game_api.get_random_pool_all_weight(this.randomPool);
        /// <summary>
        /// 获取随机池中的整数数量
        /// </summary>
        /// <param name="random_pool ">  随机池   </param>
        /// <returns>整数数量</returns>
        public int? get_random_pool_size() => game_api.get_random_pool_size(this.randomPool);
        /// <summary>
        /// 复制随机池
        /// </summary>
        /// <param name="random_pool ">  随机池   </param>
        /// <returns>随机池</returns>
        public RandomPool copy_random_pool => game_api.copy_random_pool(this.randomPool);
        /// <summary>
        /// 获取某个随机池中指定整数的权重
        /// </summary>
        /// <param name="value ">  整数   </param>
        /// <returns>整数</returns>
        public double? get_random_pool_pointed_weight(int? value) => game_api.get_random_pool_pointed_weight(this.randomPool, value);
        /// <summary>
        /// 获取某个随机池的列表
        /// </summary>
        /// <returns>整数</returns>
        public int? get_all_random_pool_value => game_api.get_all_random_pool_value(this.randomPool);
    }
}
